<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class PlatformBalanceLog extends Model
{
    protected $table = 'platform_balance_log';

    public function setTypeAttribute($value)
    {
        if( $value == 5 ){
            $this->type_value = '平台提现';
            $this->title = '平台提现';
        }elseif ( $value == 9 ){
            $this->type_value = '平台充值';
            $this->title = '平台充值';
        }
        $this->attributes['type'] = $value;
    }

}
